package club.xyes.zkh.ecommerce.commons.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * Create by 郭文梁 2019/4/18 0018 14:20
 * UserMembership
 * 用户会员关系实体类
 *
 * @author 郭文梁
 * @data 2019/4/18 0018
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table(name = "t_user_membership")
public class UserMembership extends BaseEntity {
    /**
     * 用户ID
     */
    @Column(name = "user_id", length = 10, nullable = false)
    private Integer userId;
    /**
     * 关联的用户对象
     */
    private User user;
    /**
     * 等级ID
     */
    @Column(name = "membership_level_id", length = 10, nullable = false)
    private Integer membershipLevelId;
    /**
     * 关联的等级对象
     */
    private ShopMembershipLevel level;
}
